package com.wzu.service;

import com.wzu.dao.ReaderDao;
import com.wzu.dao.ReaderDaoImpl;
import com.wzu.pojo.Reader;
import java.util.List;

public class ReaderServiceImpl implements ReaderService {
    private ReaderDao readerDao = new ReaderDaoImpl();

    @Override
    public Reader getReaderByUserId(int userId) {
        return readerDao.getReaderByUserId(userId);
    }


    @Override
    public int updateReader(Reader reader) {
        return readerDao.updateReader(reader);
    }

    @Override
    public boolean addReader(Reader reader) {
        return readerDao.addReader(reader);
    }
    @Override
    public List<Reader> getAllReaders() {
        return readerDao.getAllReaders();
    }
}